package com.hailong.flink.rpc;

import org.apache.flink.runtime.rpc.RpcEndpoint;
import org.apache.flink.runtime.rpc.RpcService;

/**
 * Created by yuanhailong on 2021/12/18.
 */
public class GetNowRpcEndpoint extends RpcEndpoint implements GetNowGateway {


    protected GetNowRpcEndpoint(RpcService rpcService) {
        super(rpcService);
    }

    @Override
    protected void onStart() throws Exception {
        System.out.println("GetNowRpcEndpoint call...");
    }

    @Override
    public String getNow() {
        /*SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:MI:SS");
        return simpleDateFormat.format(new Date());*/
        return "2020";
    }
}
